{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 导入需要的包\n",
    "import requests\n",
    "import chardet\n",
    "from lxml import etree\n",
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "<!DOCTYPE html>\n",
      "<html lang=\"zh-CN\" class=\"ua-windows ua-webkit\">\n",
      "<head>\n",
      "    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n",
      "    <meta name=\"renderer\" content=\"webkit\">\n",
      "    <meta name=\"referrer\" content=\"always\">\n",
      "    <meta name=\"google-site-verification\" content=\"ok0wCgT20tBBgo9_zat2iAcimtN4Ftf5ccsh092Xeyw\" />\n",
      "    <title>\n",
      "豆瓣电影排行榜\n",
      "</title>\n",
      "    \n",
      "    <meta name=\"baidu-site-verification\" content=\"cZdR4xxR7RxmM4zE\" />\n",
      "    <meta http-equiv=\"Pragma\" content=\"no-cache\">\n",
      "    <meta http-equiv=\"Expires\" content=\"Sun, 6 Mar 2006 01:00:00 GMT\">\n",
      "    \n",
      "    <meta name=\"keywords\" content=\"电影排行榜、新片排行榜、豆瓣电影250\"/>\n",
      "    <meta name=\"description\" content=\"豆瓣电影排行榜,提供最新电影排行榜、本周电影口碑榜和豆瓣电影TOP250\" />\n",
      "\n",
      "    <link rel=\"apple-touch-icon\" href=\"https://img1.doubanio.com/cuphead/movie-static/pics/apple-touch-icon.png\">\n",
      "    <link href=\"https://img1.doubanio.com/f/vendors/e92483e5e4c9c60cc75cbd8b700a2fd5b5fdf7b0/css/douban.css\" rel=\"stylesheet\" type=\"text/css\">\n",
      "    <link href=\"https://img1.doubanio.com/f/vendors/ee6598d46af0bc554cecec9bcbf525b9b0582cb0/css/separation/_all.css\" rel=\"stylesheet\" type=\"text/css\">\n",
      "    <link href=\"https://img1.doubanio.com/cuphead/movie-static/base/init.15f4b.css\" rel=\"stylesheet\">\n",
      "    <script type=\"text/javascript\">var _head_start = new Date();</script>\n",
      "    <script type=\"text/javascript\" src=\"https://img1.doubanio.com/f/vendors/0511abe9863c2ea7084efa7e24d1d86c5b3974f1/js/jquery-1.10.2.min.js\"></script>\n",
      "    <script type=\"text/javascript\" src=\"https://img1.doubanio.com/f/vendors/3bc4b0df56f1b004587103851e4fb5bdf07fafb3/js/douban.js\"></script>\n",
      "    <script type=\"text/javascript\" src=\"https://img1.doubanio.com/f/vendors/b0d3faaf7a432605add54908e39e17746824d6cc/js/separation/_all.js\"></script>\n",
      "    \n",
      "    <style type=\"text/css\"></style>\n",
      "    <style type=\"text/css\">img { max-width: 100%; }</style>\n",
      "    <script type=\"text/javascript\"></script>\n",
      "    <style type=\"text/css\">\n",
      "    .icon-on-air{\n",
      "        font-size:12px;\n",
      "        margin-left:15px;\n",
      "        background-color:#71B5DE;\n",
      "        color:#fff;\n",
      "        padding:3px 5px;\n",
      "        border-radius:3px;\n",
      "        white-space: nowrap;\n",
      "    }\n",
      "\n",
      "      html .pl { white-space: normal; }\n",
      "    \n",
      "    .types {\n",
      "        margin-bottom: 20px\n",
      "    }\n",
      "    .types span {\n",
      "        display: inline-block;\n",
      "        margin: 5px 10px 5px 0;\n",
      "        min-width: 36px;\n",
      "    }\n",
      "  \n",
      "        .box_chart_num {\n",
      "            font-size: 11px;\n",
      "            color: #494949;\n",
      "        }\n",
      "    \n",
      "        .movie_top ul li div.name { width: 240px; }\n",
      "    \n",
      "        #douban-top250 h2 span{font-size:12px;margin-left:12px;}\n",
      "        #douban-top250 .douban-top250-bd{font-size:0;letter-spacing:-0.31em;*letter-spacing:normal;}\n",
      "        #douban-top250 dl{font-size:13px;display:inline-block;*display:inline;zoom:1;letter-spacing:normal;text-align:center;width:75px;overflow:hidden;vertical-align:top;margin:0 0 10px 0;}\n",
      "        #douban-top250 dt{width:65px;margin:0 auto 8px;height:100px;overflow:hidden;}\n",
      "    </style>\n",
      "\n",
      "    <link rel=\"shortcut icon\" href=\"https://img1.doubanio.com/favicon.ico\" type=\"image/x-icon\">\n",
      "</head>\n",
      "\n",
      "<body>\n",
      "  \n",
      "    <script type=\"text/javascript\">var _body_start = new Date();</script>\n",
      "\n",
      "    \n",
      "    \n",
      "\n",
      "\n",
      "\n",
      "    <link href=\"//img3.doubanio.com/dae/accounts/resources/78fadc7/shire/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\n",
      "\n",
      "\n",
      "\n",
      "<div id=\"db-global-nav\" class=\"global-nav\">\n",
      "  <div class=\"bd\">\n",
      "    \n",
      "<div class=\"top-nav-info\">\n",
      "  <a href=\"https://accounts.douban.com/passport/login?source=movie\" class=\"nav-login\" rel=\"nofollow\">登录/注册</a>\n",
      "</div>\n",
      "\n",
      "\n",
      "    <div class=\"top-nav-doubanapp\">\n",
      "  <a href=\"https://www.douban.com/doubanapp/app?channel=top-nav\" class=\"lnk-doubanapp\">下载豆瓣客户端</a>\n",
      "  <div id=\"doubanapp-tip\">\n",
      "    <a href=\"https://www.douban.com/doubanapp/app?channel=qipao\" class=\"tip-link\">豆瓣 <span class=\"version\">6.0</span> 全新发布</a>\n",
      "    <a href=\"javascript: void 0;\" class=\"tip-close\">×</a>\n",
      "  </div>\n",
      "  <div id=\"top-nav-appintro\" class=\"more-items\">\n",
      "    <p class=\"appintro-title\">豆瓣</p>\n",
      "    <p class=\"qrcode\">扫码直接下载</p>\n",
      "    <div class=\"download\">\n",
      "      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=iOS\">iPhone</a>\n",
      "      <span>·</span>\n",
      "      <a href=\"https://www.douban.com/doubanapp/redirect?channel=top-nav&direct_dl=1&download=Android\" class=\"download-android\">Android</a>\n",
      "    </div>\n",
      "  </div>\n",
      "</div>\n",
      "\n",
      "    \n",
      "\n",
      "\n",
      "<div class=\"global-nav-items\">\n",
      "  <ul>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://www.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-main&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆瓣</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://book.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-book&quot;,&quot;uid&quot;:&quot;0&quot;}\">读书</a>\n",
      "    </li>\n",
      "    <li class=\"on\">\n",
      "      <a href=\"https://movie.douban.com\"  data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-movie&quot;,&quot;uid&quot;:&quot;0&quot;}\">电影</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://music.douban.com\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-music&quot;,&quot;uid&quot;:&quot;0&quot;}\">音乐</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://www.douban.com/location\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-location&quot;,&quot;uid&quot;:&quot;0&quot;}\">同城</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://www.douban.com/group\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-group&quot;,&quot;uid&quot;:&quot;0&quot;}\">小组</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://read.douban.com&#47;?dcs=top-nav&amp;dcm=douban\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-read&quot;,&quot;uid&quot;:&quot;0&quot;}\">阅读</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://fm.douban.com&#47;?from_=shire_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-fm&quot;,&quot;uid&quot;:&quot;0&quot;}\">FM</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://time.douban.com&#47;?dt_time_source=douban-web_top_nav\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-time&quot;,&quot;uid&quot;:&quot;0&quot;}\">时间</a>\n",
      "    </li>\n",
      "    <li class=\"\">\n",
      "      <a href=\"https://market.douban.com&#47;?utm_campaign=douban_top_nav&amp;utm_source=douban&amp;utm_medium=pc_web\" target=\"_blank\" data-moreurl-dict=\"{&quot;from&quot;:&quot;top-nav-click-market&quot;,&quot;uid&quot;:&quot;0&quot;}\">豆品</a>\n",
      "    </li>\n",
      "  </ul>\n",
      "</div>\n",
      "\n",
      "  </div>\n",
      "</div>\n",
      "<script>\n",
      "  ;window._GLOBAL_NAV = {\n",
      "    DOUBAN_URL: \"https://www.douban.com\",\n",
      "    N_NEW_NOTIS: 0,\n",
      "    N_NEW_DOUMAIL: 0\n",
      "  };\n",
      "</script>\n",
      "\n",
      "\n",
      "\n",
      "    <script src=\"//img3.doubanio.com/dae/accounts/resources/78fadc7/shire/bundle.js\" defer=\"defer\"></script>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "    \n",
      "\n",
      "\n",
      "\n",
      "    <link href=\"//img3.doubanio.com/dae/accounts/resources/78fadc7/movie/bundle.css\" rel=\"stylesheet\" type=\"text/css\">\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "<div id=\"db-nav-movie\" class=\"nav\">\n",
      "  <div class=\"nav-wrap\">\n",
      "  <div class=\"nav-primary\">\n",
      "    <div class=\"nav-logo\">\n",
      "      <a href=\"https:&#47;&#47;movie.douban.com\">豆瓣电影</a>\n",
      "    </div>\n",
      "    <div class=\"nav-search\">\n",
      "      <form action=\"https:&#47;&#47;search.douban.com&#47;movie/subject_search\" method=\"get\">\n",
      "        <fieldset>\n",
      "          <legend>搜索：</legend>\n",
      "          <label for=\"inp-query\">\n",
      "          </label>\n",
      "          <div class=\"inp\"><input id=\"inp-query\" name=\"search_text\" size=\"22\" maxlength=\"60\" placeholder=\"搜索电影、电视剧、综艺、影人\" value=\"\"></div>\n",
      "          <div class=\"inp-btn\"><input type=\"submit\" value=\"搜索\"></div>\n",
      "          <input type=\"hidden\" name=\"cat\" value=\"1002\" />\n",
      "        </fieldset>\n",
      "      </form>\n",
      "    </div>\n",
      "  </div>\n",
      "  </div>\n",
      "  <div class=\"nav-secondary\">\n",
      "    \n",
      "\n",
      "<div class=\"nav-items\">\n",
      "  <ul>\n",
      "    <li    ><a href=\"https://movie.douban.com/cinema/nowplaying/\"\n",
      "     >影讯&购票</a>\n",
      "    </li>\n",
      "    <li    ><a href=\"https://movie.douban.com/explore\"\n",
      "     >选电影</a>\n",
      "    </li>\n",
      "    <li    ><a href=\"https://movie.douban.com/tv/\"\n",
      "     >电视剧</a>\n",
      "    </li>\n",
      "    <li    ><a href=\"https://movie.douban.com/chart\"\n",
      "     >排行榜</a>\n",
      "    </li>\n",
      "    <li    ><a href=\"https://movie.douban.com/review/best/\"\n",
      "     >影评</a>\n",
      "    </li>\n",
      "    <li    ><a href=\"https://movie.douban.com/annual/2023/?fullscreen=1&source=navigation\"\n",
      "     >2023年度榜单</a>\n",
      "    </li>\n",
      "    <li    ><a href=\"https://c9.douban.com/app/standbyme-2023/?autorotate=false&fullscreen=true&hidenav=true&monitor_screenshot=true&source=web_navigation\"\n",
      "            target=\"_blank\"\n",
      "     >2023年度报告</a>\n",
      "    </li>\n",
      "  </ul>\n",
      "</div>\n",
      "\n",
      "    <a href=\"https://movie.douban.com/annual/2023/?fullscreen=1&source=movie_navigation\" class=\"movieannual\"></a>\n",
      "  </div>\n",
      "</div>\n",
      "\n",
      "<script id=\"suggResult\" type=\"text/x-jquery-tmpl\">\n",
      "  <li data-link=\"{{= url}}\">\n",
      "            <a href=\"{{= url}}\" onclick=\"moreurl(this, {from:'movie_search_sugg', query:'{{= keyword }}', subject_id:'{{= id}}', i: '{{= index}}', type: '{{= type}}'})\">\n",
      "            <img src=\"{{= img}}\" width=\"40\" />\n",
      "            <p>\n",
      "                <em>{{= title}}</em>\n",
      "                {{if year}}\n",
      "                    <span>{{= year}}</span>\n",
      "                {{/if}}\n",
      "                {{if sub_title}}\n",
      "                    <br /><span>{{= sub_title}}</span>\n",
      "                {{/if}}\n",
      "                {{if address}}\n",
      "                    <br /><span>{{= address}}</span>\n",
      "                {{/if}}\n",
      "                {{if episode}}\n",
      "                    {{if episode==\"unknow\"}}\n",
      "                        <br /><span>集数未知</span>\n",
      "                    {{else}}\n",
      "                        <br /><span>共{{= episode}}集</span>\n",
      "                    {{/if}}\n",
      "                {{/if}}\n",
      "            </p>\n",
      "        </a>\n",
      "        </li>\n",
      "  </script>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "    <script src=\"//img3.doubanio.com/dae/accounts/resources/78fadc7/movie/bundle.js\" defer=\"defer\"></script>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "    \n",
      "    <div id=\"wrapper\">\n",
      "        \n",
      "\n",
      "        \n",
      "    <div id=\"content\">\n",
      "        \n",
      "    <h1>豆瓣电影排行榜</h1>\n",
      "\n",
      "        <div class=\"grid-16-8 clearfix\">\n",
      "            \n",
      "            \n",
      "            <div class=\"article\">\n",
      "                \n",
      "    <h2>豆瓣新片榜   · · · · · · </h2>\n",
      "    <div class=\"indent\">\n",
      "        \n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "<div class=\"\">\n",
      "    <p class=\"ul first\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/36934908/\"  title=\"因果报应\">\n",
      "                        <img src=\"https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2909638286.jpg\" width=\"75\" alt=\"因果报应\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/36934908/\"  class=\"\">\n",
      "                        因果报应\n",
      "                        / <span style=\"font-size:13px;\">天道轮回 / 谁偷了垃圾桶？(台)</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "\n",
      "                    <p class=\"pl\">2024-06-14(印度) / 2024(中国大陆) / 维杰·西图帕提 / 阿努拉格·卡施亚普 / 玛玛塔·莫汉达斯 / 那塔拉简·苏布拉马尼亚姆 / 阿比拉米 / 迪维亚·巴拉蒂 / 辛加姆普利 / 阿鲁多斯 / 穆尼什坎特 / 萨沙纳·纳米达斯 / 维诺德·萨加尔 / 马尼干丹...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar45\"></span>\n",
      "                                <span class=\"rating_nums\">8.6</span>\n",
      "                                <span class=\"pl\">(101193人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_36934908\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/35242872/\"  title=\"狗阵\">\n",
      "                        <img src=\"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2908333792.jpg\" width=\"75\" alt=\"狗阵\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/35242872/\"  class=\"\">\n",
      "                        狗阵\n",
      "                        / <span style=\"font-size:13px;\">狗镇 / 斗狗</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "                        <span style=\"font-size: 13px; padding-left: 3px; color: #00A65F;\">[可播放]</span>\n",
      "\n",
      "                    <p class=\"pl\">2024-05-18(戛纳电影节) / 2024-06-15(中国大陆) / 彭于晏 / 佟丽娅 / 贾樟柯 / 周游 / 胡晓光 / 王奕权 / 牛犇 / 小辛 / 张译 / 袁弘 / 魏晨 / 赵毅 / 张建亚 / 张杨 / 王砚辉 / 沙宝亮 / 尹元章 / 张立 / 莫涂弘哲 / 吴优 / 答有为 / 楚布花羯 / 王乃训...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar35\"></span>\n",
      "                                <span class=\"rating_nums\">7.0</span>\n",
      "                                <span class=\"pl\">(74826人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_35242872\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/36149380/\"  title=\"长腿\">\n",
      "                        <img src=\"https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2908275411.jpg\" width=\"75\" alt=\"长腿\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/36149380/\"  class=\"\">\n",
      "                        长腿\n",
      "                        / <span style=\"font-size:13px;\">长腿怪 / 长脚怪</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "\n",
      "                    <p class=\"pl\">2024-07-10(法国) / 2024-07-12(美国) / 麦卡·梦露 / 尼古拉斯·凯奇 / 布莱尔·安德伍德 / 艾丽西亚·维特 / 米歇尔·乔伊-李 / 达科塔·道尔比 / 劳伦·阿卡拉 / 琪兰·席普卡 / 贾森·戴 / 丽莎·钱德勒 / 莱拉·麦金托什 / 卡梅尔·阿密特 / 沙芬·卡里姆...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar30\"></span>\n",
      "                                <span class=\"rating_nums\">5.5</span>\n",
      "                                <span class=\"pl\">(13060人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_36149380\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/35494829/\"  title=\"红毯先生\">\n",
      "                        <img src=\"https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2905249058.jpg\" width=\"75\" alt=\"红毯先生\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/35494829/\"  class=\"\">\n",
      "                        红毯先生\n",
      "                        / <span style=\"font-size:13px;\">全民明星 / The Movie Emperor</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "                        <span style=\"font-size: 13px; padding-left: 3px; color: #00A65F;\">[可播放]</span>\n",
      "\n",
      "                    <p class=\"pl\">2023-09-14(多伦多电影节) / 2023-10-14(平遥国际电影展) / 2024-02-10(中国大陆点映) / 2024-03-15(中国大陆) / 刘德华 / 单立文 / 瑞玛·席丹 / 余伟国 / 宁浩 / 林熙蕾 / 梁家辉 / 杨千嬅 / 王晶 / 张子贤 / 刘漪琳 / 周炜 / 孙阳 / 薛宝鹤 / 马东 / 刘若清...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar35\"></span>\n",
      "                                <span class=\"rating_nums\">6.5</span>\n",
      "                                <span class=\"pl\">(113843人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_35494829\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/35712796/\"  title=\"逃脱\">\n",
      "                        <img src=\"https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2909038894.jpg\" width=\"75\" alt=\"逃脱\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/35712796/\"  class=\"\">\n",
      "                        逃脱\n",
      "                        / <span style=\"font-size:13px;\">逃走 / 绝地逃生(台)</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "\n",
      "                    <p class=\"pl\">2024-07-03(韩国) / 李帝勋 / 具教焕 / 洪萨宾 / 李絮 / 李浩贞 / 池贤静 / 徐现宇 / 宋江 / 李成旭 / 郑浚远 / 金相宪 / 张荣男 / 车顺裴 / 李浩哲 / 陈庸旭 / 宋永世 / 吴贞媛 / 金允裴 / 朴佳英 / 洪正浩 / 申东贤 / 李承勇 / 朴永希 / 韩国 / 李宗弼...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar30\"></span>\n",
      "                                <span class=\"rating_nums\">6.3</span>\n",
      "                                <span class=\"pl\">(6213人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_35712796\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/36114521/\"  title=\"陷阱\">\n",
      "                        <img src=\"https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2912496189.jpg\" width=\"75\" alt=\"陷阱\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/36114521/\"  class=\"\">\n",
      "                        陷阱\n",
      "                        / <span style=\"font-size:13px;\">圈套(港/台) / Good Grades</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "\n",
      "                    <p class=\"pl\">2024-08-02(美国) / 乔什·哈奈特 / 阿里尔·多诺霍 / 莎莱克·沙马兰  / 艾丽森·皮尔 / 海莉·米尔斯 / 乔纳森·兰登 / 马克·巴科克 / 玛妮·麦克菲尔 / 卡迪小子 / 罗斯 / 马西娅·贝内特 / 凡妮莎·斯迈思 / M·奈特·沙马兰 / 洛克兰·雷·米勒...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar30\"></span>\n",
      "                                <span class=\"rating_nums\">5.8</span>\n",
      "                                <span class=\"pl\">(7182人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_36114521\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/36108875/\"  title=\"善良的种类\">\n",
      "                        <img src=\"https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2908268311.jpg\" width=\"75\" alt=\"善良的种类\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/36108875/\"  class=\"\">\n",
      "                        善良的种类\n",
      "                        / <span style=\"font-size:13px;\">怜悯的种类(港/台) / 善种</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "\n",
      "                    <p class=\"pl\">2024-05-17(戛纳电影节) / 2024-06-21(美国) / 2024-06-28(英国) / 艾玛·斯通 / 杰西·普莱蒙 / 威廉·达福 / 玛格丽特·库里 / 周洪 / 乔·阿尔文 / 马莫多·阿西 / 亨特·莎弗 / 默拉·贝努瓦 / 苏珊·艾尔 / 克莉丝朵·阿莱恩·钱伯斯 / 比比·博克斯...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar30\"></span>\n",
      "                                <span class=\"rating_nums\">6.1</span>\n",
      "                                <span class=\"pl\">(6691人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_36108875\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/36207284/\"  title=\"传说\">\n",
      "                        <img src=\"https://img2.doubanio.com/view/photo/s_ratio_poster/public/p2910411311.jpg\" width=\"75\" alt=\"传说\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/36207284/\"  class=\"\">\n",
      "                        传说\n",
      "                        / <span style=\"font-size:13px;\">神话2 / A Legend</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "                        <span style=\"font-size: 13px; padding-left: 3px; color: #00A65F;\">[可播放]</span>\n",
      "\n",
      "                    <p class=\"pl\">2024-07-10(中国大陆) / 成龙 / 张艺兴 / 古力娜扎 / 李治廷 / 李晨 / 彭小苒 / 窦骁 / 郑业成 / 马元 / 吕良伟 / 金巧巧 / 马艳丽 / 艾尔番·艾则孜 / 贾冰 / 金喜善 / 唐季礼 / 降央卓玛 / 阿兰 / 中国大陆 / 中国香港 / 唐季礼 / 2024-07-05 21:00...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar25\"></span>\n",
      "                                <span class=\"rating_nums\">4.9</span>\n",
      "                                <span class=\"pl\">(29597人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_36207284\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/35193100/\"  title=\"帅哥们\">\n",
      "                        <img src=\"https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2909009185.jpg\" width=\"75\" alt=\"帅哥们\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/35193100/\"  class=\"\">\n",
      "                        帅哥们\n",
      "                        / <span style=\"font-size:13px;\">Handsome Guys / 找死凶宅(台)</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "\n",
      "                    <p class=\"pl\">2024-06-26(韩国) / 李星民 / 李熙俊 / 孔升妍 / 朴智焕 / 李奎炯 / 张东柱 / 姜基栋 / 金度勋 / 宾灿旭 / 朴正花 / 朴庆惠 / 李书焕 / 宋宥弦 / 禹贤 / 林元熙 / 韩国 / 南东协 / 101分钟 / 帅哥们 / 喜剧 / 恐怖 / 南东协 Nam Dong-hyub / 韩语 / 英语...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar35\"></span>\n",
      "                                <span class=\"rating_nums\">6.6</span>\n",
      "                                <span class=\"pl\">(7775人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_35193100\"></div>\n",
      "    <p class=\"ul\"></p>\n",
      "    <table width=\"100%\" class=\"\">\n",
      "        <tr class=\"item\">\n",
      "            <td width=\"100\" valign=\"top\">\n",
      "                \n",
      "\n",
      "                    <a class=\"nbg\" href=\"https://movie.douban.com/subject/36822550/\"  title=\"打黑\">\n",
      "                        <img src=\"https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2912056140.jpg\" width=\"75\" alt=\"打黑\" class=\"\"/>\n",
      "                    </a>\n",
      "            </td>\n",
      "\n",
      "            <td valign=\"top\">\n",
      "                \n",
      "\n",
      "                <div class=\"pl2\">\n",
      "\n",
      "                    <a href=\"https://movie.douban.com/subject/36822550/\"  class=\"\">\n",
      "                        打黑\n",
      "                        / <span style=\"font-size:13px;\">Black Storm</span>\n",
      "                    </a>\n",
      "\n",
      "\n",
      "                        <span style=\"font-size: 13px; padding-left: 3px; color: #00A65F;\">[可播放]</span>\n",
      "\n",
      "                    <p class=\"pl\">2024-08-22(中国大陆) / 释小龙 / 包贝尔 / 曲栅栅 / 李大强 / 刘峰超 / 王正权 / 赵润南 / 高维蔓 / 王宏 / 周开开 / 孙彩纶 / 房岩 / 高强 / 秦焰 / 周波 / 任正斌 / 王亚军 / 王一珺 / 中国大陆 / 秦鹏飞 / 97分钟 / 动作 / 犯罪 / 王泊淞 / 汉语普通话...</p>\n",
      "\n",
      "                    \n",
      "\n",
      "\n",
      "                        \n",
      "                        <div class=\"star clearfix\">\n",
      "                                <span class=\"allstar30\"></span>\n",
      "                                <span class=\"rating_nums\">5.6</span>\n",
      "                                <span class=\"pl\">(8351人评价)</span>\n",
      "\n",
      "                        </div>\n",
      "\n",
      "\n",
      "                </div>\n",
      "\n",
      "            </td>\n",
      "        </tr>\n",
      "    </table>\n",
      "    <div id=\"collect_form_36822550\"></div>\n",
      "</div>\n",
      "\n",
      "\n",
      "    </div>\n",
      "    \n",
      "\n",
      "            </div>\n",
      "            <div class=\"aside\">\n",
      "                \n",
      "    \n",
      "  \n",
      "  <div>\n",
      "      <h2>分类排行榜 · · · · · ·<img style=\" position: absolute;\" src=\"https://img3.doubanio.com/cuphead/movie-static/pics/favicon/new_menu.gif\"></h2>\n",
      "      <div class=\"types\">\n",
      "          <span><a href=\"/typerank?type_name=剧情&type=11&interval_id=100:90&action=\">剧情</a></span>\n",
      "          <span><a href=\"/typerank?type_name=喜剧&type=24&interval_id=100:90&action=\">喜剧</a></span>\n",
      "          <span><a href=\"/typerank?type_name=动作&type=5&interval_id=100:90&action=\">动作</a></span>\n",
      "          <span><a href=\"/typerank?type_name=爱情&type=13&interval_id=100:90&action=\">爱情</a></span>\n",
      "          <span><a href=\"/typerank?type_name=科幻&type=17&interval_id=100:90&action=\">科幻</a></span>\n",
      "          <span><a href=\"/typerank?type_name=动画&type=25&interval_id=100:90&action=\">动画</a></span>\n",
      "          <span><a href=\"/typerank?type_name=悬疑&type=10&interval_id=100:90&action=\">悬疑</a></span>\n",
      "          <span><a href=\"/typerank?type_name=惊悚&type=19&interval_id=100:90&action=\">惊悚</a></span>\n",
      "          <span><a href=\"/typerank?type_name=恐怖&type=20&interval_id=100:90&action=\">恐怖</a></span>\n",
      "          <span><a href=\"/typerank?type_name=纪录片&type=1&interval_id=100:90&action=\">纪录片</a></span>\n",
      "          <span><a href=\"/typerank?type_name=短片&type=23&interval_id=100:90&action=\">短片</a></span>\n",
      "          <span><a href=\"/typerank?type_name=情色&type=6&interval_id=100:90&action=\">情色</a></span>\n",
      "          <span><a href=\"/typerank?type_name=音乐&type=14&interval_id=100:90&action=\">音乐</a></span>\n",
      "          <span><a href=\"/typerank?type_name=歌舞&type=7&interval_id=100:90&action=\">歌舞</a></span>\n",
      "          <span><a href=\"/typerank?type_name=家庭&type=28&interval_id=100:90&action=\">家庭</a></span>\n",
      "          <span><a href=\"/typerank?type_name=儿童&type=8&interval_id=100:90&action=\">儿童</a></span>\n",
      "          <span><a href=\"/typerank?type_name=传记&type=2&interval_id=100:90&action=\">传记</a></span>\n",
      "          <span><a href=\"/typerank?type_name=历史&type=4&interval_id=100:90&action=\">历史</a></span>\n",
      "          <span><a href=\"/typerank?type_name=战争&type=22&interval_id=100:90&action=\">战争</a></span>\n",
      "          <span><a href=\"/typerank?type_name=犯罪&type=3&interval_id=100:90&action=\">犯罪</a></span>\n",
      "          <span><a href=\"/typerank?type_name=西部&type=27&interval_id=100:90&action=\">西部</a></span>\n",
      "          <span><a href=\"/typerank?type_name=奇幻&type=16&interval_id=100:90&action=\">奇幻</a></span>\n",
      "          <span><a href=\"/typerank?type_name=冒险&type=15&interval_id=100:90&action=\">冒险</a></span>\n",
      "          <span><a href=\"/typerank?type_name=灾难&type=12&interval_id=100:90&action=\">灾难</a></span>\n",
      "          <span><a href=\"/typerank?type_name=武侠&type=29&interval_id=100:90&action=\">武侠</a></span>\n",
      "          <span><a href=\"/typerank?type_name=古装&type=30&interval_id=100:90&action=\">古装</a></span>\n",
      "          <span><a href=\"/typerank?type_name=运动&type=18&interval_id=100:90&action=\">运动</a></span>\n",
      "          <span><a href=\"/typerank?type_name=黑色电影&type=31&interval_id=100:90&action=\">黑色电影</a></span>\n",
      "      </div>\n",
      "  </div>\n",
      "\n",
      "\n",
      "    \n",
      "    <div class=\"movie_top\" id=\"ranking\">\n",
      "    <div class=\"movie_top\" id=\"ranking\">\n",
      "        \n",
      "    \n",
      "    \n",
      "    <h2>一周口碑榜· · · · · · <span class=\"box_chart_num color-gray\">9月27日 更新</span></h2>\n",
      "    <ul class=\"content\" id=\"listCont2\">\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">1</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/36587974/\" class=\"\">\n",
      "                    出走的决心\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">1</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">2</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/30412658/\" class=\"\">\n",
      "                    里斯本丸沉没\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"down\">1</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">3</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/36934908/\" class=\"\">\n",
      "                    因果报应\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">8</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">4</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/36689857/\" class=\"\">\n",
      "                    荒野机器人\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">7</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">5</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/35973112/\" class=\"\">\n",
      "                    我们最后一次做孩子\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">6</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">6</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/35211513/\" class=\"\">\n",
      "                    但愿人长久\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"down\">3</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">7</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/35818061/\" class=\"\">\n",
      "                    李沧东：讽刺的艺术\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">4</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">8</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/35603727/\" class=\"\">\n",
      "                    漂流\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">3</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">9</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/35503392/\" class=\"\">\n",
      "                    幸福的国家\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">2</div>\n",
      "            </span>\n",
      "        </li>\n",
      "        <li class=\"clearfix\">\n",
      "            <div class=\"no\">10</div>\n",
      "            <div class=\"name\">\n",
      "                <a onclick=\"moreurl(this, {from:'mv_week'})\" href=\"https://movie.douban.com/subject/36191305/\" class=\"\">\n",
      "                    无尽的边界\n",
      "                </a>\n",
      "            </div>\n",
      "            <span class=\"\">\n",
      "                    <div class=\"up\">1</div>\n",
      "            </span>\n",
      "        </li>\n",
      "    </ul>\n",
      "\n",
      "    </div>\n",
      "\n",
      "    <div class=\"movie_top\" id=\"ranking\">\n",
      "        \n",
      "    \n",
      "    <h2>北美票房榜· · · · · · <span class=\"box_chart_num color-gray\">9月20日 更新 / 美元</span></h2>\n",
      "    <ul class=\"content\" id=\"listCont1\">\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">1</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/25774362/\" class=\"\">\n",
      "                            怪奇大法师\n",
      "                        </a>\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">2600万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">2</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/34960078/\" class=\"\">\n",
      "                            变形金刚：起源\n",
      "                        </a>\n",
      "                                <img src=\"https://img1.doubanio.com/f/vendors/267048ed5190c4c6b513c2e559cae7ae8b8f0af5/pics/box_new.png\" />\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">2500万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">3</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/36363752/\" class=\"\">\n",
      "                            非礼勿言\n",
      "                        </a>\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">590万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">4</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/35930233/\" class=\"\">\n",
      "                            千万别松手\n",
      "                        </a>\n",
      "                                <img src=\"https://img1.doubanio.com/f/vendors/267048ed5190c4c6b513c2e559cae7ae8b8f0af5/pics/box_new.png\" />\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">450万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">5</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/26957900/\" class=\"\">\n",
      "                            死侍与金刚狼\n",
      "                        </a>\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">390万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">6</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/35882838/\" class=\"\">\n",
      "                            某种物质\n",
      "                        </a>\n",
      "                                <img src=\"https://img1.doubanio.com/f/vendors/267048ed5190c4c6b513c2e559cae7ae8b8f0af5/pics/box_new.png\" />\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">310万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">7</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/36995721/\" class=\"\">\n",
      "                            种族奇事\n",
      "                        </a>\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">254万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">8</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/26309513/\" class=\"\">\n",
      "                            里根\n",
      "                        </a>\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">167万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">9</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/37018493/\" class=\"\">\n",
      "                            田柾国：我在这里\n",
      "                        </a>\n",
      "                                <img src=\"https://img1.doubanio.com/f/vendors/267048ed5190c4c6b513c2e559cae7ae8b8f0af5/pics/box_new.png\" />\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">143万</span>\n",
      "                </li>\n",
      "            \n",
      "                <li class=\"clearfix\">\n",
      "                    <div class=\"no\">10</div>\n",
      "                    <div class=\"box_chart\">\n",
      "                        <a onclick=\"moreurl(this, {from:'mv_us_week'})\" href=\"https://movie.douban.com/subject/35792500/\" class=\"\">\n",
      "                            异形：夺命舰\n",
      "                        </a>\n",
      "                    </div>\n",
      "                    <span class=\"box_chart_num color-gray\">133万</span>\n",
      "                </li>\n",
      "    </ul>\n",
      "\n",
      "    </div>\n",
      "\n",
      "    <!-- douban ad begin -->\n",
      "    \n",
      "\n",
      "\n",
      "\n",
      "<link rel=\"stylesheet\" href=\"https://img3.doubanio.com/cuphead/movie-static/ad/mobile_app_ad.faa73.css\">\n",
      "<div class=\"mobile-app-entrance block5 app-movie\">\n",
      "    <a class=\"entrance-link\" href=\"https://www.douban.com/doubanapp/frodo\">\n",
      "        <div class=\"entrance-qrcode\">\n",
      "            <img src=\"https://img2.doubanio.com/cuphead/movie-static/pics/douban_app_ad/qrcode.png\" alt=\"扫码下载豆瓣 App\" width=\"80\" height=\"80\" />\n",
      "        </div>\n",
      "        <div class=\"entrance-info\">\n",
      "            <span class=\"app-icon icon-movie\"></span>\n",
      "            <span class=\"main-title\">豆瓣</span>\n",
      "            <span class=\"sub-title\">你的移动观影指南</span>\n",
      "        </div>\n",
      "    </a>\n",
      "</div>\n",
      "\n",
      "    <!-- douban ad end -->\n",
      "\n",
      "        <div class=\"indent\">\n",
      "            \n",
      "    <div id=\"douban-top250\">\n",
      "        <div class=\"douban-top250-hd\">\n",
      "            <h2>豆瓣电影TOP250\n",
      "                <span>\n",
      "                    <a href=\"https://movie.douban.com/top250\">全部&nbsp;</a>\n",
      "                </span>\n",
      "            </h2>\n",
      "        </div>\n",
      "        <div class=\"douban-top250-bd\">\n",
      "            \n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1291585/?from=top250\">\n",
      "                    <img src=\"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p1917567652.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1291585/?from=top250\" class=\"\">\n",
      "                    风之谷\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1418200/?from=top250\">\n",
      "                    <img src=\"https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2016401659.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1418200/?from=top250\" class=\"\">\n",
      "                    傲慢与偏见\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1293839/?from=top250\">\n",
      "                    <img src=\"https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2189265085.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1293839/?from=top250\" class=\"\">\n",
      "                    罗马假日\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "            <div class=\"clearfix rr\" style=\"width:100%\"></div>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1308767/?from=top250\">\n",
      "                    <img src=\"https://img9.doubanio.com/view/photo/s_ratio_poster/public/p667644866.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1308767/?from=top250\" class=\"\">\n",
      "                    谍影重重2\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/2334904/?from=top250\">\n",
      "                    <img src=\"https://img1.doubanio.com/view/photo/s_ratio_poster/public/p450262388.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/2334904/?from=top250\" class=\"\">\n",
      "                    禁闭岛\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1316510/?from=top250\">\n",
      "                    <img src=\"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2609063922.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1316510/?from=top250\" class=\"\">\n",
      "                    射雕英雄传之东成西就\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "            <div class=\"clearfix rr\" style=\"width:100%\"></div>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1292328/?from=top250\">\n",
      "                    <img src=\"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p1982176012.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1292328/?from=top250\" class=\"\">\n",
      "                    东邪西毒\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1292434/?from=top250\">\n",
      "                    <img src=\"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p2567845803.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1292434/?from=top250\" class=\"\">\n",
      "                    一一\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1293318/?from=top250\">\n",
      "                    <img src=\"https://img1.doubanio.com/view/photo/s_ratio_poster/public/p2237136718.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1293318/?from=top250\" class=\"\">\n",
      "                    萤火虫之墓\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "            <div class=\"clearfix rr\" style=\"width:100%\"></div>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/25807345/?from=top250\">\n",
      "                    <img src=\"https://img9.doubanio.com/view/photo/s_ratio_poster/public/p2187896734.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/25807345/?from=top250\" class=\"\">\n",
      "                    彗星来的那一夜\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1296736/?from=top250\">\n",
      "                    <img src=\"https://img2.doubanio.com/view/photo/s_ratio_poster/public/p1381339291.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1296736/?from=top250\" class=\"\">\n",
      "                    钢琴家\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "        <dl class=\"\">\n",
      "            <dt>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1578507/?from=top250\">\n",
      "                    <img src=\"https://img3.doubanio.com/view/photo/s_ratio_poster/public/p792223507.jpg\" class=\"m_sub_img\"/>\n",
      "                </a>\n",
      "            </dt>\n",
      "            <dd>\n",
      "                <a onclick=\"moreurl(this, {from:'mv_tops'})\" href=\"https://movie.douban.com/subject/1578507/?from=top250\" class=\"\">\n",
      "                    谍影重重3\n",
      "                </a>\n",
      "                <span class=\"gact\"></span><br/>\n",
      "            </dd>\n",
      "        </dl>\n",
      "            <div class=\"clearfix rr\" style=\"width:100%\"></div>\n",
      "\n",
      "        </div>\n",
      "    </div>\n",
      "    \n",
      "\n",
      "        </div>\n",
      "    </div>\n",
      "\n",
      "            </div>\n",
      "            <div class=\"extra\">\n",
      "                \n",
      "    <!-- douban ad begin -->\n",
      "    <div id=\"dale_movie_chart_bottom_banner\"></div>\n",
      "    <!-- douban ad end -->\n",
      "\n",
      "            </div>\n",
      "        </div>\n",
      "    </div>\n",
      "\n",
      "        \n",
      "    <div id=\"footer\">\n",
      "            <div class=\"footer-extra\"></div>\n",
      "        \n",
      "<span id=\"icp\" class=\"fleft gray-link\">\n",
      "    &copy; 2005－2024 douban.com, all rights reserved 北京豆网科技有限公司\n",
      "</span>\n",
      "\n",
      "<a href=\"https://www.douban.com/hnypt/variformcyst.py\" style=\"display: none;\"></a>\n",
      "\n",
      "<span class=\"fright\">\n",
      "    <a href=\"https://www.douban.com/about\">关于豆瓣</a>\n",
      "    · <a href=\"https://www.douban.com/jobs\">在豆瓣工作</a>\n",
      "    · <a href=\"https://www.douban.com/about?topic=contactus\">联系我们</a>\n",
      "    · <a href=\"https://www.douban.com/about/legal\">法律声明</a>\n",
      "    \n",
      "    · <a href=\"https://help.douban.com/?app=movie\" target=\"_blank\">帮助中心</a>\n",
      "    · <a href=\"https://www.douban.com/doubanapp/\">移动应用</a>\n",
      "    · <a href=\"https://www.douban.com/partner/\">豆瓣广告</a>\n",
      "</span>\n",
      "\n",
      "    </div>\n",
      "\n",
      "    </div>\n",
      "    <!-- COLLECTED JS -->\n",
      "        \n",
      "        \n",
      "    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://img1.doubanio.com/f/vendors/e8a7261937da62636d22ca4c579efc4a4d759b1b/css/ui/dialog.css\" />\n",
      "    <link rel=\"stylesheet\" type=\"text/css\" href=\"https://img1.doubanio.com/cuphead/movie-static/mod/login_pop.b2f60.css\" />\n",
      "    <script type=\"text/javascript\" src=\"https://img1.doubanio.com/f/vendors/f25ae221544f39046484a823776f3aa01769ee10/js/ui/dialog.js\"></script>\n",
      "    <script type=\"text/javascript\">\n",
      "        var HTTPS_DB = \"https://www.douban.com\"\n",
      "    </script>\n",
      "    <script type=\"text/javascript\" src=\"https://img1.doubanio.com/cuphead/movie-static/mod/login_pop.7f2b9.js\"></script>\n",
      "\n",
      "    \n",
      "    <!-- douban ad begin -->\n",
      "    \n",
      "\n",
      "\n",
      "\n",
      "\n",
      "    \n",
      "<script type=\"text/javascript\">\n",
      "    (function (global) {\n",
      "        var newNode = global.document.createElement('script'),\n",
      "            existingNode = global.document.getElementsByTagName('script')[0],\n",
      "            adSource = '//erebor.douban.com/',\n",
      "            userId = '',\n",
      "            browserId = '_WDUYHtjTh4',\n",
      "            criteria = '3:/chart',\n",
      "            preview = '',\n",
      "            debug = false,\n",
      "            adSlots = ['dale_movie_chart_bottom_banner'];\n",
      "\n",
      "        global.DoubanAdRequest = {src: adSource, uid: userId, bid: browserId, crtr: criteria, prv: preview, debug: debug};\n",
      "        global.DoubanAdSlots = (global.DoubanAdSlots || []).concat(adSlots);\n",
      "\n",
      "        newNode.setAttribute('type', 'text/javascript');\n",
      "        newNode.setAttribute('src', '//img1.doubanio.com/bG90MDZqMy9mL2FkanMvYzhmZjE5MGNhYzNkN2UyMWJjMTI3NzJlYWNkOWVkODZhMmFjMzdhMi9hZC5yZWxlYXNlLmpz?company_token=kX69T8w1wyOE-dale');\n",
      "        newNode.setAttribute('async', true);\n",
      "        existingNode.parentNode.insertBefore(newNode, existingNode);\n",
      "    })(this);\n",
      "</script>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "    <!-- douban ad end -->\n",
      "\n",
      "    \n",
      "  \n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "<script type=\"text/javascript\">\n",
      "var _paq = _paq || [];\n",
      "_paq.push(['trackPageView']);\n",
      "_paq.push(['enableLinkTracking']);\n",
      "(function() {\n",
      "    var p=(('https:' == document.location.protocol) ? 'https' : 'http'), u=p+'://fundin.douban.com/';\n",
      "    _paq.push(['setTrackerUrl', u+'piwik']);\n",
      "    _paq.push(['setSiteId', '100001']);\n",
      "    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];\n",
      "    g.type='text/javascript';\n",
      "    g.defer=true;\n",
      "    g.async=true;\n",
      "    g.src=p+'://img3.doubanio.com/dae/fundin/piwik.js';\n",
      "    s.parentNode.insertBefore(g,s);\n",
      "})();\n",
      "</script>\n",
      "\n",
      "<script type=\"text/javascript\">\n",
      "var setMethodWithNs = function(namespace) {\n",
      "  var ns = namespace ? namespace + '.' : ''\n",
      "    , fn = function(string) {\n",
      "        if(!ns) {return string}\n",
      "        return ns + string\n",
      "      }\n",
      "  return fn\n",
      "}\n",
      "\n",
      "var gaWithNamespace = function(fn, namespace) {\n",
      "  var method = setMethodWithNs(namespace)\n",
      "  fn.call(this, method)\n",
      "}\n",
      "\n",
      "var _gaq = _gaq || []\n",
      "  , accounts = [\n",
      "      { id: 'UA-7019765-1', namespace: 'douban' }\n",
      "    , { id: 'UA-7019765-19', namespace: '' }\n",
      "    ]\n",
      "  , gaInit = function(account) {\n",
      "      gaWithNamespace(function(method) {\n",
      "        gaInitFn.call(this, method, account)\n",
      "      }, account.namespace)\n",
      "    }\n",
      "  , gaInitFn = function(method, account) {\n",
      "      _gaq.push([method('_setAccount'), account.id]);\n",
      "      _gaq.push([method('_setSampleRate'), '5']);\n",
      "\n",
      "      \n",
      "  _gaq.push([method('_addOrganic'), 'google', 'q'])\n",
      "  _gaq.push([method('_addOrganic'), 'baidu', 'wd'])\n",
      "  _gaq.push([method('_addOrganic'), 'soso', 'w'])\n",
      "  _gaq.push([method('_addOrganic'), 'youdao', 'q'])\n",
      "  _gaq.push([method('_addOrganic'), 'so.360.cn', 'q'])\n",
      "  _gaq.push([method('_addOrganic'), 'sogou', 'query'])\n",
      "  if (account.namespace) {\n",
      "    _gaq.push([method('_addIgnoredOrganic'), '豆瓣'])\n",
      "    _gaq.push([method('_addIgnoredOrganic'), 'douban'])\n",
      "    _gaq.push([method('_addIgnoredOrganic'), '豆瓣网'])\n",
      "    _gaq.push([method('_addIgnoredOrganic'), 'www.douban.com'])\n",
      "  }\n",
      "\n",
      "      if (account.namespace === 'douban') {\n",
      "        _gaq.push([method('_setDomainName'), '.douban.com'])\n",
      "      }\n",
      "\n",
      "        _gaq.push([method('_setCustomVar'), 1, 'responsive_view_mode', 'desktop', 3])\n",
      "\n",
      "        _gaq.push([method('_setCustomVar'), 2, 'login_status', '0', 2]);\n",
      "\n",
      "      _gaq.push([method('_trackPageview')])\n",
      "    }\n",
      "\n",
      "for(var i = 0, l = accounts.length; i < l; i++) {\n",
      "  var account = accounts[i]\n",
      "  gaInit(account)\n",
      "}\n",
      "\n",
      "\n",
      ";(function() {\n",
      "    var ga = document.createElement('script');\n",
      "    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n",
      "    ga.setAttribute('async', 'true');\n",
      "    document.documentElement.firstChild.appendChild(ga);\n",
      "})()\n",
      "</script>\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "\n",
      "      \n",
      "\n",
      "    <!-- dae-web-movie--default-59b47894-gmbp9-->\n",
      "\n",
      "  <script>_SPLITTEST=''</script>\n",
      "</body>\n",
      "\n",
      "</html>\n",
      "\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "# 1.获取豆瓣电影排行榜网页数据\n",
    "url=\"https://movie.douban.com/chart\"\n",
    "headers={\n",
    "    \"user-agent\":\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36\"\n",
    "}\n",
    "response=requests.get(url,headers=headers)\n",
    "encoding=chardet.detect(response.content)[\"encoding\"]\n",
    "response.html=response.content.decode(encoding)\n",
    "print(response.html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'movie_title': ['因果报应', '狗阵', '长腿', '红毯先生', '逃脱', '陷阱', '善良的种类', '传说', '帅哥们'], 'movie_jianjie': ['2024-06-14(印度) / 2024(中国大陆) / 维杰·西图帕提 / 阿努拉格·卡施亚普 / 玛玛塔·莫汉达斯 / 那塔拉简·苏布拉马尼亚姆 / 阿比拉米 / 迪维亚·巴拉蒂 / 辛加姆普利 / 阿鲁多斯 / 穆尼什坎特 / 萨沙纳·纳米达斯 / 维诺德·萨加尔 / 马尼干丹...', '2024-05-18(戛纳电影节) / 2024-06-15(中国大陆) / 彭于晏 / 佟丽娅 / 贾樟柯 / 周游 / 胡晓光 / 王奕权 / 牛犇 / 小辛 / 张译 / 袁弘 / 魏晨 / 赵毅 / 张建亚 / 张杨 / 王砚辉 / 沙宝亮 / 尹元章 / 张立 / 莫涂弘哲 / 吴优 / 答有为 / 楚布花羯 / 王乃训...', '2024-07-10(法国) / 2024-07-12(美国) / 麦卡·梦露 / 尼古拉斯·凯奇 / 布莱尔·安德伍德 / 艾丽西亚·维特 / 米歇尔·乔伊-李 / 达科塔·道尔比 / 劳伦·阿卡拉 / 琪兰·席普卡 / 贾森·戴 / 丽莎·钱德勒 / 莱拉·麦金托什 / 卡梅尔·阿密特 / 沙芬·卡里姆...', '2023-09-14(多伦多电影节) / 2023-10-14(平遥国际电影展) / 2024-02-10(中国大陆点映) / 2024-03-15(中国大陆) / 刘德华 / 单立文 / 瑞玛·席丹 / 余伟国 / 宁浩 / 林熙蕾 / 梁家辉 / 杨千嬅 / 王晶 / 张子贤 / 刘漪琳 / 周炜 / 孙阳 / 薛宝鹤 / 马东 / 刘若清...', '2024-07-03(韩国) / 李帝勋 / 具教焕 / 洪萨宾 / 李絮 / 李浩贞 / 池贤静 / 徐现宇 / 宋江 / 李成旭 / 郑浚远 / 金相宪 / 张荣男 / 车顺裴 / 李浩哲 / 陈庸旭 / 宋永世 / 吴贞媛 / 金允裴 / 朴佳英 / 洪正浩 / 申东贤 / 李承勇 / 朴永希 / 韩国 / 李宗弼...', '2024-08-02(美国) / 乔什·哈奈特 / 阿里尔·多诺霍 / 莎莱克·沙马兰  / 艾丽森·皮尔 / 海莉·米尔斯 / 乔纳森·兰登 / 马克·巴科克 / 玛妮·麦克菲尔 / 卡迪小子 / 罗斯 / 马西娅·贝内特 / 凡妮莎·斯迈思 / M·奈特·沙马兰 / 洛克兰·雷·米勒...', '2024-05-17(戛纳电影节) / 2024-06-21(美国) / 2024-06-28(英国) / 艾玛·斯通 / 杰西·普莱蒙 / 威廉·达福 / 玛格丽特·库里 / 周洪 / 乔·阿尔文 / 马莫多·阿西 / 亨特·莎弗 / 默拉·贝努瓦 / 苏珊·艾尔 / 克莉丝朵·阿莱恩·钱伯斯 / 比比·博克斯...', '2024-07-10(中国大陆) / 成龙 / 张艺兴 / 古力娜扎 / 李治廷 / 李晨 / 彭小苒 / 窦骁 / 郑业成 / 马元 / 吕良伟 / 金巧巧 / 马艳丽 / 艾尔番·艾则孜 / 贾冰 / 金喜善 / 唐季礼 / 降央卓玛 / 阿兰 / 中国大陆 / 中国香港 / 唐季礼 / 2024-07-05 21:00...', '2024-06-26(韩国) / 李星民 / 李熙俊 / 孔升妍 / 朴智焕 / 李奎炯 / 张东柱 / 姜基栋 / 金度勋 / 宾灿旭 / 朴正花 / 朴庆惠 / 李书焕 / 宋宥弦 / 禹贤 / 林元熙 / 韩国 / 南东协 / 101分钟 / 帅哥们 / 喜剧 / 恐怖 / 南东协 Nam Dong-hyub / 韩语 / 英语...'], 'movie_num': ['8.6', '7.0', '5.5', '6.5', '6.3', '5.8', '6.1', '4.9', '6.6'], 'movie_num_people': ['(101193人评价)', '(74826人评价)', '(13060人评价)', '(113843人评价)', '(6213人评价)', '(7182人评价)', '(6691人评价)', '(29597人评价)', '(7775人评价)']}\n"
     ]
    }
   ],
   "source": [
    "# 2.解析数据\n",
    "html=etree.HTML(response.html)\n",
    "movie_title_list=[]\n",
    "movie_jianjie_list=[]\n",
    "movie_num_list=[]\n",
    "movie_num_people_list=[]\n",
    "result={}\n",
    "for i in range(1,10):\n",
    "    movie_title_path=\"/html[@class='ua-windows ua-webkit']/body/div[@id='wrapper']/div[@id='content']/div[@class='grid-16-8 clearfix']/div[@class='article']/div[@class='indent']/div/table[\"\\\n",
    "    +str(i)+\"]/tr[@class='item']/td[2]/div[@class='pl2']/a/text()\"\n",
    "    node_movie_title=html.xpath(movie_title_path)\n",
    "#      获取列表第一个元素\n",
    "    node_movie_title=str(node_movie_title[0])\n",
    "#     去除字符串中的空格\n",
    "    node_movie_title=\"\".join(node_movie_title.split())\n",
    "#     去除尾部的/\n",
    "    node_movie_title=node_movie_title[:-1]\n",
    "    movie_jianjie_path=\"/html[@class='ua-windows ua-webkit']/body/div[@id='wrapper']/div[@id='content']/div[@class='grid-16-8 clearfix']/div[@class='article']/div[@class='indent']/div/table[\"\\\n",
    "    +str(i)+\"]/tr[@class='item']/td[2]/div[@class='pl2']/p[@class='pl']/text()\"\n",
    "    node_movie_jianjie=html.xpath(movie_jianjie_path)\n",
    "    \n",
    "    movie_num_path=\"/html[@class='ua-windows ua-webkit']/body/div[@id='wrapper']/div[@id='content']/div[@class='grid-16-8 clearfix']/div[@class='article']/div[@class='indent']/div/table[\"\\\n",
    "    +str(i)+\"]/tr[@class='item']/td[2]/div[@class='pl2']/div[@class='star clearfix']/span[@class='rating_nums']/text()\"\n",
    "    node_movie_num=html.xpath(movie_num_path)\n",
    "    \n",
    "    movie_num_people_path=\"/html[@class='ua-windows ua-webkit']/body/div[@id='wrapper']/div[@id='content']/div[@class='grid-16-8 clearfix']/div[@class='article']/div[@class='indent']/div/table[\"\\\n",
    "    +str(i)+\"]/tr[@class='item']/td[2]/div[@class='pl2']/div[@class='star clearfix']/span[@class='pl']/text()\"\n",
    "    node_movie_num_people=html.xpath(movie_num_people_path)\n",
    "    \n",
    "    movie_title_list.append(node_movie_title)\n",
    "    movie_jianjie_list.append(node_movie_jianjie[0])\n",
    "    movie_num_list.append(node_movie_num[0])\n",
    "    print\n",
    "    movie_num_people_list.append(node_movie_num_people[0])\n",
    "    \n",
    "    \n",
    "result={\n",
    "    \"movie_title\":movie_title_list,\n",
    "    \"movie_jianjie\":movie_jianjie_list,\n",
    "    \"movie_num\":movie_num_list,\n",
    "    \"movie_num_people\":movie_num_people_list\n",
    "}\n",
    "\n",
    "print(result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 字典转Dataframe\n",
    "df = pd.DataFrame(result)\n",
    "\n",
    "# DataFrame写入Excel\n",
    "df.to_excel('result.xlsx',index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
